﻿
--修改产品
CREATE proc [dbo].[proc_Product_Update]
(
	@Sort int,
	@CateOneId int,
	@CateTwoId int,
	@SupplierId int,
	@Title nvarchar(50),
	@CostPrice numeric(18,2),
	@SalePrice numeric(18,2),
	@Description nvarchar(1000),
	@Id int,
	@SCateOneId int,
	@SCateTwoId int,
	@SubjectId INT,
	@xmfx int,
	@flag int
)
as
	Begin
		update Product set 
		Sort=@Sort,
		CateOneId=@CateOneId,
		CateTwoId=@CateTwoId,
		SupplierId=@SupplierId,
		Title=@Title,
		CostPrice=@CostPrice,
		SalePrice=@SalePrice,
		Description=@Description,
		SCateOneId=@SCateOneId,
		SCateTwoId=@SCateTwoId,
		SubjectId=@SubjectId,xmfx = @xmfx,flag=@flag
		where Id=@Id

		--修改接口人列表 
		Update ProjectInterfaceSet Set 
										CateOneId=@CateOneId,
										CateTwoId=@CateTwoId,
										Title=@Title,
										CostPrice=@CostPrice,
										SalePrice=@SalePrice,
										Description=@Description,
										Sort=@Sort
		Where ProductId=@Id
	End
